<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport"
	content="width=device-width,initial-scale=1,maximum-scale=1" />
<meta name="description"
	content="小米是全球领先的TCT(信息与通信)基础设施和只能终端提供商,致力于把数字世界带入每个人,每个家庭,每个组织,构建万物互联的智能世界." />
<meta name="keywords"
	content="电信网络,无线接入,网络,核心网,业务与软件,站点解决方案,全球服务,系统集成解决方案,保障服务解决方案,学习与发展解决方案,终端,移动宽带终端,手机,融合终端,视讯解决方案" />
<!--权威标签:标准-->
<link rel="canonical" href="https://https://www.mi.com/index.html">
<link rel="stylesheet" type="text/css" href="static/css/userinfo.css">
<!--标题前图标-->
<link rel="shortcut icon" href="img/favicon.ico" />
<script src="js/register.js"></script>
<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
<script src="js/jquery-1.12.4.js"></script>
<script src="js/jquery-1.12.4.min.js"></script>
<title>小米账号-个人信息</title>
</head>

<body>
	<!--
        	最外面的框
        -->
	<div id="wrap">
		<div id="header">
			<a href="${basePath}CommAction?p=WEB-INF/logined/adminManage/homepage" targrt="iframe0"><img src="static/img/headLogo.png" /></a> 
			<a href="${basePath}CommAction?p=WEB-INF/logined/adminManage/homepage" class="text">退出</a>
		</div>
		<div id="content">
			<ul id="nav">
				<div id="head-portrait">
					<div id="face">
						<%
							String loginImg = (String) session.getAttribute("mimg");
						 	if (loginImg != null) {
						 		String user = session.getAttribute("mimg").toString();
						 		out.print("<img src='"+user+"' width = '80px' height = '80px'/>");
						 	} else {
						 		out.print("<img src='img/head_portrait.png' />");
						 	}
						%>
					</div>
					<p class="text">
					<%
					 	String loginName = (String) session.getAttribute("mname");
					 	if (loginName != null) {
					 		String user = session.getAttribute("mname").toString();
					 		out.print(user);
					 	} else {
					 		out.print("请设置名字");
					 	}
					 %> 
					</p>
					<p class="text num">
					Id : 
					<%
					 	String loginId = (String) session.getAttribute("mid");
				 		String userId = session.getAttribute("mid").toString();
				 		out.print(userId);
					 %>
					</p>
				</div>
			</ul>
			<div id="table-wrap">
				<div id="table">
					<div id="face-block">
						<div id="face" style = "width:">
							<%
							 	if (loginImg != null) {
							 		String user = session.getAttribute("mimg").toString();
							 		out.print("<img src='"+user+"' width = '80px' height = '80px'/>");
							 	} else {
							 		out.print("<img src='img/head_portrait.png' />");
							 	}
							%>
							<!-- <img src="static/uploadfiles/amdinImgs\amdinImg_1538386858368.jpg" /> -->
							<a id = "showImgModel" class="text" href="#">设置头像</a>
						</div>
					</div>
					<table>
						<tr>
							<td><a id="showInfoModel" href="#"><div id="test"></div>编辑</a>
								<h4>基础资料</h4></td>
						</tr>
						<tr>
							<td>姓名：<span style="color: #999999"> 
					<%
					 	if (loginName != null) {
					 		String user = session.getAttribute("mname").toString();
					 		out.print(user);
					 	} else {
					 		out.print("请设置名字");
					 	}
					 %> 
							</span></td>
						</tr>
						<tr>
							<td>手机：<span style="color: #999999"> 
					<%
					 	String loginTel = (String) session.getAttribute("mtel");
					 	if (loginTel != null) {
					 		// 用户已登录
					 		String userTel = session.getAttribute("mtel").toString();
					 		out.print(userTel);
					 	} else {
					 		// 用户未登录
					 		out.print("请添加手机号");
					 	}
					 %> 
							</span></td>
						</tr>
						<tr>
							<td>邮箱：<span style="color: #999999"> 
					<%
					 	String loginEmail = (String) session.getAttribute("memail");
					 	if (loginEmail != null) {
					 		// 用户已登录
					 		String userEmail = session.getAttribute("memail").toString();
					 		out.print(userEmail);
					 	} else {
					 		// 用户未登录
					 		out.print("请添加邮箱");
					 	}
					 %> 
							</span></td>
						</tr>
						<tr>
							<td><a href="#">管理</a>
								<h4>高级设置</h4></td>
						</tr>
						<tr>
							<td>银行卡：</td>
						</tr>
						<tr>
							<td>账号地区：中国</td>
						</tr>
					</table>
				</div>
				<!--基本信息-->
				<div id="modalInfo" class="modal">
					<div class="modal-content">
						<header class="modal-header">
							<h4>修改用户信息</h4>
							<span class="close" id="closeInfo">×</span>
						</header>
						<div class="modal-body">
							<form id = "infoForm" action="ManagerUpdateAction" method="post">
								
								<div class="text" style="height:30px;font-size:20px;">
									姓名:<input style="display: inline-block;margin-left:40px;height:22px;" type="text" name="manager_name" id="manager_name" placeholder="请输入用户名"/>
								</div>
								
								
								<div class="text" style="height:30px;font-size:20px;margin-top:5px">
									手机号码:<input type="text" style="height:22px" name="manager_tel" id="manager_tel" placeholder="请输入手机号"/>
								</div>
								<div class="text" style="height:30px;font-size:20px;margin-top:5px">
									邮箱:<input style="display: inline-block;margin-left:40px;height:22px;" type="text" style="height:22px;" name="manager_email" id="manager_email" placeholder="请输入邮箱"/>
								</div>
							</form>
						</div>
						<footer class="modal-footer">
							<button id="cancelInfo">取消</button>
							<button id="sure" onclick = "document.getElementById('infoForm').submit();">确定</button>
						</footer>
					</div>
				</div>
				<!--头像-->
				<div id="modalImg" class="modal">
					<div class="modal-content">
						<header class="modal-header">
							<h4>修改头像</h4>
							<span class="close" id="closeImg">×</span>
						</header>
						<div class="modal-body">
							<form id = "imgForm" action="ManagerUpdateAction" method="post" enctype="multipart/form-data">
								<div class="text">
									<input type="file" name="manager_img" id="manager_img" value="上传头像" />
								</div>
							</form>
						</div>
						<footer class="modal-footer">
							<button id="cancelImg">取消</button>
							<button id="sure" onclick = "document.getElementById('imgForm').submit();">确定</button>
						</footer>
					</div>
				</div>
			</div>
		</div>
		<div id="footer">
			<div id="font-family">
				<p class="text">
					<a href="" class="choise">简体</a>| <a href="">繁体</a>| <a href="">English</a>|
					<a href="">常见问题</a>
				</p>
			</div>
			<div id="copyright">
				<p class="text">
					小米公司版权所有-京ICP备10046444- <a
						href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802020134"><img
						src="img/ghs.png" />京公网安备11010802020134号</a>-京ICP证110507号
				</p>
			</div>
		</div>
	</div>
	<script>
			/*基本信息模态框*/
			var btnInfo = document.getElementById('showInfoModel');
			var closeInfo = document.getElementById('closeInfo');
			var cancelInfo = document.getElementById('cancelInfo');
			var modalInfo = document.getElementById('modalInfo');

			btnInfo.addEventListener('click', function() {
				modalInfo.style.display = "block";
			});
			closeInfo.addEventListener('click', function() {
				modalInfo.style.display = "none";
			});
			cancelInfo.addEventListener('click', function() {
				modalInfo.style.display = "none";
			});

			/*头像模态框*/
			var btnImg = document.getElementById('showImgModel');
			var closeImg = document.getElementById('closeImg');
			var cancelImg = document.getElementById('cancelImg');
			var modalImg = document.getElementById('modalImg');

			btnImg.addEventListener('click', function() {
				modalImg.style.display = "block";
			});
			closeImg.addEventListener('click', function() {
				modalImg.style.display = "none";
			});
			cancelImg.addEventListener('click', function() {
				modalImg.style.display = "none";
			});
		</script>

</body>

</html>